
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
/**
 * This section controls the shooter-arm-thing.
 * @author Team Pranto
 */


public class ProntoShooter {

    Joystick shootStick;
    Jaguar shooterMotor, rotationMotor, heightMotor;

    /**
     * 
     * @param shootStick the right-most stick on the control thing
     */
    public ProntoShooter(Joystick shootStick) {
        this.shootStick = shootStick;
        shooterMotor = new Jaguar(5);
        rotationMotor = new Jaguar(6);
        heightMotor = new Jaguar(7);
    }
    
    /**
     * When we press the trigger on the right stick, it makes the shooting motor spin faster.
     * 
     */
    public void shoot(){
        shooterMotor.set(0.5);
        if (shootStick.getTrigger()) {
            shooterMotor.set(1.0);
            //wait a certain amount of milliseconds lol hahaha jajaj how to do???
            try {
                Thread.sleep(5000);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
            shooterMotor.set(0.5);
        }
    }
    /**
     * this makes the shooter arm go up and down
     */
    public void height(){
       heightMotor.set(shootStick.getY());
    }
    /**
     * this makes the shooter arm go left and right
     */
    public void rotate(){
       rotationMotor.set(shootStick.getX());
    }
    
}
